package com.task.manager.controller.index;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import com.alibaba.druid.util.StringUtils;

@Controller
@RequestMapping("/home")
public class HomeController {

	@RequestMapping("/index")
	public String home(Map<String, Object> map,@ModelAttribute("initButton")String initButton) {
		if(StringUtils.isEmpty(initButton)) {
			map.put("initButton", "#task");
		}else {
			map.put("initButton", "#"+initButton);
		}
		
		return "home";
	}
}
